<!--
 * @Descripttion: HN-SaaS管理系统
 * @version: 1.0.0
 * @Author: 侯建军
 * @Date: 2020-09-08 10:29:59
 * @LastEditors: 侯建军
 * @LastEditTime: 2020-09-09 16:40:19
-->
<template>
  <div>
    <div class="queryPatient">
      <el-form :model="keyword" :inline="true">
        <el-form-item label="身份证号" prop="value">
          <el-input v-model="keyword.value"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="success">查询</el-button>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onRegister">挂号</el-button>
        </el-form-item>
        <el-form-item>
          <el-button type="warning" @click="onRegister">退号</el-button>
        </el-form-item>
      </el-form>
    </div>
    <!-- 挂号信息 -->
    <div class="patient">
      <el-form label-position="left" inline>
        <el-form-item label="姓名:" label-width="100px">
          <span>{{ patient.name }}</span>
        </el-form-item>
        <el-form-item label="性别:" label-width="100px">
          <span>{{ patient.shop }}</span>
        </el-form-item>
        <el-form-item label="年龄:" label-width="100px">
          <span>{{ patient.id }}</span>
        </el-form-item>
        <el-form-item label="出生日期:" label-width="100px">
          <span>{{ patient.shopId }}</span>
        </el-form-item>
        <el-form-item label="身份证号:" label-width="100px">
          <span>{{ patient.category }}</span>
        </el-form-item>
        <el-form-item label="家庭住址:" label-width="100px">
          <span>{{ patient.address }}</span>
        </el-form-item>
      </el-form>
    </div>
    <!-- 信息表格 -->
    <el-table :data="tableData5" style="width: 100%">
      <el-table-column type="selection" width="55"></el-table-column>
      <el-table-column type="expand">
        <template slot-scope="props">
          <el-form label-position="left"  class="demo-table-expand">
            <el-form-item label="病历号">
              <span>{{ props.row.name }}</span>
            </el-form-item>
            <el-form-item label="看诊医生">
              <span>{{ props.row.shop }}</span>
            </el-form-item>
            <el-form-item label="科室">
              <span>{{ props.row.id }}</span>
            </el-form-item>
            <el-form-item label="号别">
              <span>{{ props.row.shopId }}</span>
            </el-form-item>
            <el-form-item label="挂号金额">
              <span>{{ props.row.category }}</span>
            </el-form-item>
            <el-form-item label="收费方式">
              <span>{{ props.row.address }}</span>
            </el-form-item>
            <el-form-item label="创建日期">
              <span>{{ props.row.desc }}</span>
            </el-form-item>
          </el-form>
        </template>
      </el-table-column>
      <el-table-column label="患者姓名" prop="id"></el-table-column>
      <el-table-column label="病历号" prop="medical_id"></el-table-column>
      <el-table-column label="看诊医生" prop="name"></el-table-column>
      <el-table-column label="科室" prop="desc"></el-table-column>
      <el-table-column label="看诊日期" prop="desc"></el-table-column>
    </el-table>
    <!-- 挂号信息对话框 -->
    <AddRegister :dialogVisible="dialogVisible" @close="close" />
  </div>
</template>

<script>
import AddRegister from "@/views/register/AddRegister.vue";
export default {
  name: "",
  components: {
    AddRegister,
  },
  data() {
    return {
      dialogVisible: false,
      keyword: {},
      patient: {},
      register: { initNumber: 0, useNumber: 0 },
      tableData5: [
        {
          id: "12987122",
          name: "好滋好味鸡蛋仔",
          category: "江浙小吃、小吃零食",
          desc: "荷兰优质淡奶，奶香浓而不腻",
          address: "上海市普陀区真北路",
          shop: "王小虎夫妻店",
          shopId: "10333",
        },
        {
          id: "12987123",
          name: "好滋好味鸡蛋仔",
          category: "江浙小吃、小吃零食",
          desc: "荷兰优质淡奶，奶香浓而不腻",
          address: "上海市普陀区真北路",
          shop: "王小虎夫妻店",
          shopId: "10333",
        },
        {
          id: "12987125",
          name: "好滋好味鸡蛋仔",
          category: "江浙小吃、小吃零食",
          desc: "荷兰优质淡奶，奶香浓而不腻",
          address: "上海市普陀区真北路",
          shop: "王小虎夫妻店",
          shopId: "10333",
        },
        {
          id: "12987126",
          name: "好滋好味鸡蛋仔",
          category: "江浙小吃、小吃零食",
          desc: "荷兰优质淡奶，奶香浓而不腻",
          address: "上海市普陀区真北路",
          shop: "王小虎夫妻店",
          shopId: "10333",
        },
      ],
    };
  },
  methods: {
    onRegister() {
      this.dialogVisible = true;
    },
    close() {
      this.dialogVisible = false;
    },
  },
};
</script>

<style lang="scss" scoped>
.queryPatient {
  text-align: left;
  margin-bottom: 10px;
}
.patient .el-form-item {
  text-align: left;
  margin-right: 0;
  margin-bottom: 0;
  width: 33%;
}
.registerInfo {
  text-align: left;
}
</style>